package com.cib.xagcjs.common;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Data;

import java.util.ArrayList;

/**
 * 统一请求报文
 */
@Data
public class RmbRequest {

    @JsonProperty("jsonrpc")
    private String jsonrpc;

    @JsonProperty("method")
    private String method;

    @JsonProperty("params")
    private Params params;

    @JsonProperty("id")
    private int id;

    @JsonProperty("mode")
    private String mode;

    @Data
    public static class Params {
        private int type;
        private ChaincodeID chaincodeID;
        private CtorMsg ctorMsg;
        private String secureContext;
    }

    @Data
    public static class ChaincodeID {
        private String name;
    }

    @Data
    public static class CtorMsg {
        private String function;
        private ArrayList<Object> args;
    }
}

